\hypertarget{classLPF__Fst}{}\doxysection{L\+P\+F\+\_\+\+Fst Class Reference}
\label{classLPF__Fst}\index{LPF\_Fst@{LPF\_Fst}}


fist order low pass filter  




{\ttfamily \#include $<$L\+P\+F\+\_\+fst.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classLPF__Fst_a48bcbd03cf6bc81fdd7a916d24d6c1c5}{L\+P\+F\+\_\+\+Fst}} (double fc, double Ts)
\begin{DoxyCompactList}\small\item\em Construct a new lpf\+\_\+fst object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classLPF__Fst_aca2bc6dae4cbdbe8770d27b23466578f}{set\+Para}} (double fc, double Ts)
\begin{DoxyCompactList}\small\item\em Set the parameter of the low-\/pass-\/filter. \end{DoxyCompactList}\item 
double \mbox{\hyperlink{classLPF__Fst_a6b4ab19af93dc33dbc449ccef47c985f}{ft\+Out}} (double data\+In)
\begin{DoxyCompactList}\small\item\em filter the input data \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
fist order low pass filter 

transfer function\+: H(s) = w\+\_\+c / (s + w\+\_\+c) w\+\_\+c\+: cutoff angular frequency w\+\_\+c = 2 \textbackslash{}pi f\+\_\+c

using the backward difference method, time interval is T\+\_\+s s = (1 -\/ z$^\wedge$\{-\/1\}) / T\+\_\+s \textbackslash{}alpha = 1 / (1 + (f\+\_\+s/(2 \textbackslash{}pi f\+\_\+c))) = T\+\_\+s / (T\+\_\+s + 1 / (2 \textbackslash{}pi f\+\_\+c ))

filter result u\+\_\+o(k) = \textbackslash{}alpha $\ast$ u\+\_\+i(k) + (1 -\/ \textbackslash{}alpha) $\ast$ u\+\_\+o(k-\/1) 

Definition at line 24 of file L\+P\+F\+\_\+fst.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classLPF__Fst_a48bcbd03cf6bc81fdd7a916d24d6c1c5}\label{classLPF__Fst_a48bcbd03cf6bc81fdd7a916d24d6c1c5}} 
\index{LPF\_Fst@{LPF\_Fst}!LPF\_Fst@{LPF\_Fst}}
\index{LPF\_Fst@{LPF\_Fst}!LPF\_Fst@{LPF\_Fst}}
\doxysubsubsection{\texorpdfstring{LPF\_Fst()}{LPF\_Fst()}}
{\footnotesize\ttfamily L\+P\+F\+\_\+\+Fst\+::\+L\+P\+F\+\_\+\+Fst (\begin{DoxyParamCaption}\item[{double}]{fc,  }\item[{double}]{Ts }\end{DoxyParamCaption})}



Construct a new lpf\+\_\+fst object. 


\begin{DoxyParams}{Parameters}
{\em fc} & cutoff frequency \\
\hline
{\em Ts} & discretization time interval \\
\hline
\end{DoxyParams}


Definition at line 17 of file L\+P\+F\+\_\+fst.\+cpp.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classLPF__Fst_a6b4ab19af93dc33dbc449ccef47c985f}\label{classLPF__Fst_a6b4ab19af93dc33dbc449ccef47c985f}} 
\index{LPF\_Fst@{LPF\_Fst}!ftOut@{ftOut}}
\index{ftOut@{ftOut}!LPF\_Fst@{LPF\_Fst}}
\doxysubsubsection{\texorpdfstring{ftOut()}{ftOut()}}
{\footnotesize\ttfamily double L\+P\+F\+\_\+\+Fst\+::ft\+Out (\begin{DoxyParamCaption}\item[{double}]{data\+In }\end{DoxyParamCaption})}



filter the input data 


\begin{DoxyParams}{Parameters}
{\em data\+In} & data to be filtered \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
double 
\end{DoxyReturn}


Definition at line 21 of file L\+P\+F\+\_\+fst.\+cpp.

\mbox{\Hypertarget{classLPF__Fst_aca2bc6dae4cbdbe8770d27b23466578f}\label{classLPF__Fst_aca2bc6dae4cbdbe8770d27b23466578f}} 
\index{LPF\_Fst@{LPF\_Fst}!setPara@{setPara}}
\index{setPara@{setPara}!LPF\_Fst@{LPF\_Fst}}
\doxysubsubsection{\texorpdfstring{setPara()}{setPara()}}
{\footnotesize\ttfamily void L\+P\+F\+\_\+\+Fst\+::set\+Para (\begin{DoxyParamCaption}\item[{double}]{fc,  }\item[{double}]{Ts }\end{DoxyParamCaption})}



Set the parameter of the low-\/pass-\/filter. 


\begin{DoxyParams}{Parameters}
{\em fc} & cutoff frequency \\
\hline
{\em Ts} & discretization time interval \\
\hline
\end{DoxyParams}


Definition at line 33 of file L\+P\+F\+\_\+fst.\+cpp.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
L\+P\+F\+\_\+fst.\+h\item 
L\+P\+F\+\_\+fst.\+cpp\end{DoxyCompactItemize}
